// 使用RGB值创建颜色
Color color1 = new Color(255, 0, 0); // 红色
Color color2 = new Color(0, 255, 0); // 绿色
Color color3 = new Color(0, 0, 255); // 蓝色

// 使用RGB整数创建颜色
int rgbValue = 0xFF00FF; // 紫色
Color color4 = new Color(rgbValue);

// 使用浮点值创建颜色
Color color5 = new Color(0.5f, 0.5f, 0.5f, 0.5f); // 半透明的灰色

Color color = new Color(128, 64, 32);
int red = color.getRed();
int green = color.getGreen();
int blue = color.getBlue();
int alpha = color.getAlpha();

System.out.println("Red: " + red);
System.out.println("Green: " + green);
System.out.println("Blue: " + blue);
System.out.println("Alpha: " + alpha);

Color redColor = Color.RED;
Color greenColor = Color.GREEN;
Color blueColor = Color.BLUE;
Color blackColor = Color.BLACK;
Color whiteColor = Color.WHITE;

// 将RGB颜色转换为HSB颜色
float[] hsbValues = Color.RGBtoHSB(128, 64, 32, null);
Color hsbColor = Color.getHSBColor(hsbValues[0], hsbValues[1], hsbValues[2]);

Color color1 = new Color(255, 0, 0); // 红色
Color color2 = new Color(0, 0, 255); // 蓝色
Color blendedColor = new Color((color1.getRed() + color2.getRed()) / 2,
                              (color1.getGreen() + color2.getGreen()) / 2,
                              (color1.getBlue() + color2.getBlue()) / 2);